package com.zhaochao.dubbo;


import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.concurrent.CountDownLatch;

/**
 * @author Jerry Lee
 */
public class ConsumerMain {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("application-context-consumer.xml");
        classPathXmlApplicationContext.start();
        final IHelloService helloService = (IHelloService) classPathXmlApplicationContext.getBean("helloService");
        final IHelloService helloService1 = (IHelloService) classPathXmlApplicationContext.getBean("helloService1");
        while (true){
            String world = helloService.sayHello("zhaochao");
            String world1=helloService1.sayHello("zhaochao");
            System.out.println(world);
            System.out.println(world1);

        }

    }
}
